load("@protobuf//bazel:cc_proto_library.bzl", "cc_proto_library")
load("@protobuf//bazel:proto_library.bzl", "proto_library")

package(default_visibility = ["//visibility:public"])

proto_library(
    name = "arrow_primitive_proto",
    srcs = ["schemas/proto/foxglove/ArrowPrimitive.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":color_proto",
        ":pose_proto",
    ],
)

cc_proto_library(
    name = "arrow_primitive_cc_proto",
    deps = [
        ":arrow_primitive_proto",
    ],
)

proto_library(
    name = "camera_calibration_proto",
    srcs = ["schemas/proto/foxglove/CameraCalibration.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        "@protobuf//:timestamp_proto",
    ],
)

cc_proto_library(
    name = "camera_calibration_cc_proto",
    deps = [
        ":camera_calibration_proto",
    ],
)

proto_library(
    name = "circle_annotation_proto",
    srcs = ["schemas/proto/foxglove/CircleAnnotation.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":color_proto",
        ":point2_proto",
        "@protobuf//:timestamp_proto",
    ],
)

cc_proto_library(
    name = "circle_annotation_cc_proto",
    deps = [
        ":circle_annotation_proto",
    ],
)

proto_library(
    name = "color_proto",
    srcs = ["schemas/proto/foxglove/Color.proto"],
    strip_import_prefix = "schemas/proto",
)

cc_proto_library(
    name = "color_cc_proto",
    deps = [
        ":color_proto",
    ],
)

proto_library(
    name = "compressed_image_proto",
    srcs = ["schemas/proto/foxglove/CompressedImage.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        "@protobuf//:timestamp_proto",
    ],
)

cc_proto_library(
    name = "compressed_image_cc_proto",
    deps = [
        ":compressed_image_proto",
    ],
)

proto_library(
    name = "compressed_video_proto",
    srcs = ["schemas/proto/foxglove/CompressedVideo.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        "@protobuf//:timestamp_proto",
    ],
)

cc_proto_library(
    name = "compressed_video_cc_proto",
    deps = [
        ":compressed_video_proto",
    ],
)

proto_library(
    name = "cube_primitive_proto",
    srcs = ["schemas/proto/foxglove/CubePrimitive.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":color_proto",
        ":pose_proto",
        ":vector3_proto",
    ],
)

cc_proto_library(
    name = "cube_primitive_cc_proto",
    deps = [
        ":cube_primitive_proto",
    ],
)

proto_library(
    name = "cylinder_primitive_proto",
    srcs = ["schemas/proto/foxglove/CylinderPrimitive.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":color_proto",
        ":pose_proto",
        ":vector3_proto",
    ],
)

cc_proto_library(
    name = "cylinder_primitive_cc_proto",
    deps = [
        ":cylinder_primitive_proto",
    ],
)

proto_library(
    name = "frame_transform_proto",
    srcs = ["schemas/proto/foxglove/FrameTransform.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":quaternion_proto",
        ":vector3_proto",
        "@protobuf//:timestamp_proto",
    ],
)

cc_proto_library(
    name = "frame_transform_cc_proto",
    deps = [
        ":frame_transform_proto",
    ],
)

proto_library(
    name = "frame_transforms_proto",
    srcs = ["schemas/proto/foxglove/FrameTransforms.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":frame_transform_proto",
    ],
)

cc_proto_library(
    name = "frame_transforms_cc_proto",
    deps = [
        ":frame_transforms_proto",
    ],
)

proto_library(
    name = "geo_json_proto",
    srcs = ["schemas/proto/foxglove/GeoJSON.proto"],
    strip_import_prefix = "schemas/proto",
)

cc_proto_library(
    name = "geo_json_cc_proto",
    deps = [
        ":geo_json_proto",
    ],
)

proto_library(
    name = "grid_proto",
    srcs = ["schemas/proto/foxglove/Grid.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":packed_element_field_proto",
        ":pose_proto",
        ":vector2_proto",
        "@protobuf//:timestamp_proto",
    ],
)

cc_proto_library(
    name = "grid_cc_proto",
    deps = [
        ":grid_proto",
    ],
)

proto_library(
    name = "image_annotations_proto",
    srcs = ["schemas/proto/foxglove/ImageAnnotations.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":circle_annotation_proto",
        ":points_annotation_proto",
        ":text_annotation_proto",
    ],
)

cc_proto_library(
    name = "image_annotations_cc_proto",
    deps = [
        ":image_annotations_proto",
    ],
)

proto_library(
    name = "key_value_pair_proto",
    srcs = ["schemas/proto/foxglove/KeyValuePair.proto"],
    strip_import_prefix = "schemas/proto",
)

cc_proto_library(
    name = "key_value_pair_cc_proto",
    deps = [
        ":key_value_pair_proto",
    ],
)

proto_library(
    name = "laser_scan_proto",
    srcs = ["schemas/proto/foxglove/LaserScan.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":pose_proto",
        "@protobuf//:timestamp_proto",
    ],
)

cc_proto_library(
    name = "laser_scan_cc_proto",
    deps = [
        ":laser_scan_proto",
    ],
)

proto_library(
    name = "line_primitive_proto",
    srcs = ["schemas/proto/foxglove/LinePrimitive.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":color_proto",
        ":point3_proto",
        ":pose_proto",
    ],
)

cc_proto_library(
    name = "line_primitive_cc_proto",
    deps = [
        ":line_primitive_proto",
    ],
)

proto_library(
    name = "location_fix_proto",
    srcs = ["schemas/proto/foxglove/LocationFix.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        "@protobuf//:timestamp_proto",
    ],
)

cc_proto_library(
    name = "location_fix_cc_proto",
    deps = [
        ":location_fix_proto",
    ],
)

proto_library(
    name = "log_proto",
    srcs = ["schemas/proto/foxglove/Log.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        "@protobuf//:timestamp_proto",
    ],
)

cc_proto_library(
    name = "log_cc_proto",
    deps = [
        ":log_proto",
    ],
)

proto_library(
    name = "model_primitive_proto",
    srcs = ["schemas/proto/foxglove/ModelPrimitive.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":color_proto",
        ":pose_proto",
        ":vector3_proto",
    ],
)

cc_proto_library(
    name = "model_primitive_cc_proto",
    deps = [
        ":model_primitive_proto",
    ],
)

proto_library(
    name = "packed_element_field_proto",
    srcs = ["schemas/proto/foxglove/PackedElementField.proto"],
    strip_import_prefix = "schemas/proto",
)

cc_proto_library(
    name = "packed_element_field_cc_proto",
    deps = [
        ":packed_element_field_proto",
    ],
)

proto_library(
    name = "point2_proto",
    srcs = ["schemas/proto/foxglove/Point2.proto"],
    strip_import_prefix = "schemas/proto",
)

cc_proto_library(
    name = "point2_cc_proto",
    deps = [
        ":point2_proto",
    ],
)

proto_library(
    name = "point3_proto",
    srcs = ["schemas/proto/foxglove/Point3.proto"],
    strip_import_prefix = "schemas/proto",
)

cc_proto_library(
    name = "point3_cc_proto",
    deps = [
        ":point3_proto",
    ],
)

proto_library(
    name = "point_cloud_proto",
    srcs = ["schemas/proto/foxglove/PointCloud.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":packed_element_field_proto",
        ":pose_proto",
        "@protobuf//:timestamp_proto",
    ],
)

cc_proto_library(
    name = "point_cloud_cc_proto",
    deps = [
        ":point_cloud_proto",
    ],
)

proto_library(
    name = "points_annotation_proto",
    srcs = ["schemas/proto/foxglove/PointsAnnotation.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":color_proto",
        ":point2_proto",
        "@protobuf//:timestamp_proto",
    ],
)

cc_proto_library(
    name = "points_annotation_cc_proto",
    deps = [
        ":points_annotation_proto",
    ],
)

proto_library(
    name = "pose_proto",
    srcs = ["schemas/proto/foxglove/Pose.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":quaternion_proto",
        ":vector3_proto",
    ],
)

cc_proto_library(
    name = "pose_cc_proto",
    deps = [
        ":pose_proto",
    ],
)

proto_library(
    name = "pose_in_frame_proto",
    srcs = ["schemas/proto/foxglove/PoseInFrame.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":pose_proto",
        "@protobuf//:timestamp_proto",
    ],
)

cc_proto_library(
    name = "pose_in_frame_cc_proto",
    deps = [
        ":pose_in_frame_proto",
    ],
)

proto_library(
    name = "poses_in_frame_proto",
    srcs = ["schemas/proto/foxglove/PosesInFrame.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":pose_proto",
        "@protobuf//:timestamp_proto",
    ],
)

cc_proto_library(
    name = "poses_in_frame_cc_proto",
    deps = [
        ":poses_in_frame_proto",
    ],
)

proto_library(
    name = "quaternion_proto",
    srcs = ["schemas/proto/foxglove/Quaternion.proto"],
    strip_import_prefix = "schemas/proto",
)

cc_proto_library(
    name = "quaternion_cc_proto",
    deps = [
        ":quaternion_proto",
    ],
)

proto_library(
    name = "raw_image_proto",
    srcs = ["schemas/proto/foxglove/RawImage.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        "@protobuf//:timestamp_proto",
    ],
)

cc_proto_library(
    name = "raw_image_cc_proto",
    deps = [
        ":raw_image_proto",
    ],
)

proto_library(
    name = "scene_entity_proto",
    srcs = ["schemas/proto/foxglove/SceneEntity.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":arrow_primitive_proto",
        ":cube_primitive_proto",
        ":cylinder_primitive_proto",
        ":key_value_pair_proto",
        ":line_primitive_proto",
        ":model_primitive_proto",
        ":sphere_primitive_proto",
        ":text_primitive_proto",
        ":triangle_list_primitive_proto",
        "@protobuf//:duration_proto",
        "@protobuf//:timestamp_proto",
    ],
)

cc_proto_library(
    name = "scene_entity_cc_proto",
    deps = [
        ":scene_entity_proto",
    ],
)

proto_library(
    name = "scene_entity_deletion_proto",
    srcs = ["schemas/proto/foxglove/SceneEntityDeletion.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        "@protobuf//:timestamp_proto",
    ],
)

cc_proto_library(
    name = "scene_entity_deletion_cc_proto",
    deps = [
        ":scene_entity_deletion_proto",
    ],
)

proto_library(
    name = "scene_update_proto",
    srcs = ["schemas/proto/foxglove/SceneUpdate.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":scene_entity_deletion_proto",
        ":scene_entity_proto",
    ],
)

cc_proto_library(
    name = "scene_update_cc_proto",
    deps = [
        ":scene_update_proto",
    ],
)

proto_library(
    name = "sphere_primitive_proto",
    srcs = ["schemas/proto/foxglove/SpherePrimitive.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":color_proto",
        ":pose_proto",
        ":vector3_proto",
    ],
)

cc_proto_library(
    name = "sphere_primitive_cc_proto",
    deps = [
        ":sphere_primitive_proto",
    ],
)

proto_library(
    name = "text_annotation_proto",
    srcs = ["schemas/proto/foxglove/TextAnnotation.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":color_proto",
        ":point2_proto",
        "@protobuf//:timestamp_proto",
    ],
)

cc_proto_library(
    name = "text_annotation_cc_proto",
    deps = [
        ":text_annotation_proto",
    ],
)

proto_library(
    name = "text_primitive_proto",
    srcs = ["schemas/proto/foxglove/TextPrimitive.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":color_proto",
        ":pose_proto",
    ],
)

cc_proto_library(
    name = "text_primitive_cc_proto",
    deps = [
        ":text_primitive_proto",
    ],
)

proto_library(
    name = "triangle_list_primitive_proto",
    srcs = ["schemas/proto/foxglove/TriangleListPrimitive.proto"],
    strip_import_prefix = "schemas/proto",
    deps = [
        ":color_proto",
        ":point3_proto",
        ":pose_proto",
    ],
)

cc_proto_library(
    name = "triangle_list_primitive_cc_proto",
    deps = [
        ":triangle_list_primitive_proto",
    ],
)

proto_library(
    name = "vector2_proto",
    srcs = ["schemas/proto/foxglove/Vector2.proto"],
    strip_import_prefix = "schemas/proto",
)

cc_proto_library(
    name = "vector2_cc_proto",
    deps = [
        ":vector2_proto",
    ],
)

proto_library(
    name = "vector3_proto",
    srcs = ["schemas/proto/foxglove/Vector3.proto"],
    strip_import_prefix = "schemas/proto",
)

cc_proto_library(
    name = "vector3_cc_proto",
    deps = [
        ":vector3_proto",
    ],
)
